]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
recorder: Don't compute the buffer size twice
authorAdel Gadllah <adel.gadllah@gmail.com>
Sun, 11 Jan 2015 14:42:18 +0000 (15:42 +0100)
committerAdel Gadllah <adel.gadllah@gmail.com>
Sun, 11 Jan 2015 14:42:38 +0000 (15:42 +0100)
src/shell-recorder.c

index ba1e546e45b5a5dcfa94e9e5684256de122f222e..3ff3d3dc4036e5f052ac024927fcc6b1cf15bf6f 100644 (file)
@@ -437,7 +437,7 @@ recorder_record_frame (ShellRecorder *recorder)
 
   size = recorder->area.width * recorder->area.height * 4;
 
-  data = g_malloc (recorder->area.width * 4 * recorder->area.height);
+  data = g_malloc (size);
   cogl_framebuffer_read_pixels (cogl_get_draw_framebuffer (),
                                 recorder->area.x,
                                 recorder->area.y,